package com.asiainfo.api.demo.controller;

import com.asiainfo.api.demo.domain.model.DemoModel;
import com.asiainfo.api.demo.service.DemoService;
import com.asiainfo.framework.web.page.PageResult;
import com.asiainfo.framework.web.page.Pagination;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/demo")
public class DemoController extends AppController {

    @Autowired
    DemoService demoService;

    @GetMapping("/list")
    public PageResult<?> list(DemoModel model, Pagination page) {
        return demoService.list(model, page);
    }

}
